package com.woniuxy.config.exception;

import com.woniuxy.util.ResultVo;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @author 马踏东京赏樱花
 */
@RestControllerAdvice
public class GlobalException {
    @ExceptionHandler(Exception.class)
    public ResultVo catchAll(Exception e) {
        e.printStackTrace();
        return ResultVo.failure(e.toString());
    }
}